﻿#pragma once

#include <vtkAutoInit.h>
#include <vtkGenericOpenGLRenderWindow.h>
#include <vtkOutputWindow.h>
VTK_MODULE_INIT(vtkRenderingVolumeOpenGL2);
VTK_MODULE_INIT(vtkInteractionStyle);
VTK_MODULE_INIT(vtkRenderingFreeType);
VTK_MODULE_INIT(vtkRenderingOpenGL2);

#include <string>
#include <windows.h>

#include "utils/FileUtil.h"
#include "utils/QtUtil.h"

// Actions
#include "actions/ActionManager.h"

// UI组件
#include "core/AppContext.h"
#include "widgets/MainStatusBarManager.h"

class qtMain : public QMainWindow
{
    Q_OBJECT

public:
    qtMain(QWidget* parent = nullptr);
    ~qtMain();

    void setupUi();

private:
    // 主区
    QTabWidget* tabCenter;

private:
    void setupApp();

    void setupMenuBar();

    void setupToolBar();

    void setupStatusBar();

    void setupPropertyPane();

    void setupCentralWidget();

    void setupSignals();

    void loadDefaultProperty();

    void renderTitle();

    void closeEvent(QCloseEvent* e) override;

private slots:
    void onProjectLoaded();
    void onProjectSaved();

    void onStatusMessage(const QString& mesage, int timeout = 5 * 1000);
    void onShowImageTab();
};
